package com.bjb.vr.common.mapper;

import com.bjb.vr.common.dto.SysUpgrade;
import com.bjb.vr.common.vo.DevUpgradeVo;
import com.bjb.vr.common.vo.UpgradeVo;
import com.github.yulichang.base.MPJBaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author admin
 * @description 针对表【sys_upgrade】的数据库操作Mapper
 * @createDate 2022-08-03 08:32:36
 * @Entity com.bjb.vr.common.dto.SysUpgrade
 */
public interface SysUpgradeMapper extends MPJBaseMapper<SysUpgrade> {

    List<SysUpgrade> selectUpgradeInfo(@Param("versions") List<String> versions, @Param("tenantId") String tenantId);

    DevUpgradeVo getDevOneSysUpgradeInfo(@Param("tenantId") String tenantId);

    List<UpgradeVo> queryDevLatestVersion(@Param("tenantId") String tenantId);

    List<UpgradeVo> queryForceUpDevLatestVersion(@Param("tenantId") String tenantId);

    UpgradeVo selectByTimeStamp(@Param("timestamp") String timestamp);

    int selectSysUpgradeAndHistoryCount(@Param("tenantId") String tenantId, @Param("publishStatus") int publishStatus, @Param("type") String type, @Param("packageName") String packageName);

    List<UpgradeVo> selectSysUpgradeAndHistoryList(@Param("tenantId") String tenantId, @Param("publishStatus") int publishStatus, @Param("type") String type, @Param("packageName") String packageName, @Param("current") Long current, @Param("size") Long size);

    Integer existVersion(@Param("version") String version, @Param("packageType") String packageType, @Param("tenantId") String tenantId);

    String queryLatestVersion(@Param("packageType") String packageType, @Param("tenantId") String tenantId);

    UpgradeVo selectByIdNo(@Param("id") Long id);

    UpgradeVo selectOneByTenantId(@Param("tenantId") String tenantId, @Param("packageType") String packageType);
}




